// 防重复点击指令
export const debounce = {
  inserted: function (el, binding) {
    el.addEventListener('click', e => {
      if (!el.disabled) {
        binding.value()
        el.disabled = true
        el.style.cursor = 'not-allowed'
        setTimeout(() => {
          el.style.cursor = 'pointer'
          el.disabled = false
        }, 1500)
      }
    })
  },
}